package Code.Day3_20240920.com.dx.day03.UserSystem;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @ClassName SysUser
 * @Description 用户类
 * @Author 12994
 * @Date 2024/9/20 15:40
 * @Version 1.0
 **/
@Getter
@Setter
@AllArgsConstructor
abstract sealed class SysUser permits NormalUser {
    // 用户编号
    private int userId;
    // 登录名
    private String userName;
    // 登录密码
    private String userPwd;
    // 手机号
    private String phoneNumber;

    static {
        System.out.println("静态代码块在类加载时(创建对象前)，就按顺序执行");
    }

    public SysUser() {

    }

    // 显示信息
    protected abstract void showInfo();

    // 验证密码强度
    protected abstract boolean isPwdLegal();
}
